<template>
	<view class="empire-avatar">
		<view class="empire-avatar__wrap">
			<view class="avatar">
				<image class="avatar-image" :src="src"></image>
			</view>
			<view class="empire-avatar__info">
				<text class="empire-avatar__name">{{ name }}</text>
				<text class="empire-avatar__title">{{ title }}</text>
			</view>
		</view>
		<view class="empire-avatar__watch">
			<slot></slot>
		</view>
	</view>
</template>

<script setup>
defineProps({
	src: {
		type: String,
		default: undefined
	},
	name: {
		type: String,
		default: undefined
	},
	title: {
		type: String,
		default: undefined
	}
});
</script>

<style lang="scss" scoped>
.empire-avatar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16rpx 0;
}
.empire-avatar__wrap {
	flex: 2;
	display: flex;
	align-items: center;
}
.empire-avatar__info {
	display: grid;
	margin-left: 32rpx;
}
.empire-avatar__name {
	font-size: 30rpx;
}
.empire-avatar__title {
	font-size: 24rpx;
	color: #f0ad16;
}
.avatar-image {
	width: 100%;
	height: 100%;
}
.avatar {
	width: 96rpx;
	height: 96rpx;
}
</style>
